package com.content.model.Collection
{
	public class ItemGroup
	{
		private var _itemList:Array;
		private var _itemMap:Object;
		
		public function ItemGroup()
		{
			_itemList = new Array();
			_itemMap = new Object();
		}
		
		public function Clear():void{
			/*while (_itemList.length > 0) {
				_itemList.pop();
			}*/
			
			_itemList.length = 0;
			_itemMap = new Object();
		}
		
		public function AddVO(vo:ItemVO):void{
			_itemList.push(vo);
			_itemMap[vo.ID] = vo;
		}
		
		public function GetItemById(id:String):ItemVO
		{
			return _itemMap[id];
		}
		
		public function get Items():Array{
			return _itemList;
		}
		
		public function get Length():int{
			return _itemList.length;
		}
	}
}